package com.epi.one;

import com.epi.one.main.*;

/**
 * @author dxy
 * @version 1.0
 */
public class CoreApp {
    public static void main(String[] args) {
        runTest("CollectionDemo", CollectionDemo::test);
        runTest("ConCurrentDemo", ConCurrentDemo::test);
        runTest("GenericDemo", GenericDemo::test);
        runTest("InterDemo", InterDemo::test);
        runTest("MathDemo", MathDemo::test);
        runTest("TodoListApp", TodoListApp::test);
        runTest("TypeDemo", TypeDemo::test);
    }

    private static void runTest(String name, Runnable testMethod) {
        System.out.println("运行: " + name);
        try {
            testMethod.run();
            System.out.println(name + ": OK");
        } catch (Exception e) {
            System.err.println(name + ": 异常 - " + e.getMessage());
        }
        System.out.println("-----------------------------");
    }
}
